package categoryservice.web;

import czxy.common.BaseResult;
import czxy.service.impl.BrandServiceimpl;
import czxy.service.impl.CategoryServiceimpl;
import czxy.service.impl.ProductServiceimpl;
import czxy.service.impl.UserServiceimpl;
import czxy.util.JWTUtil;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import pojo.Brand;
import pojo.Category;
import pojo.Product;
import czxy.dao.ProductSearchVO;
import pojo.User;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/category")
//@CrossOrigin
public class CategoryController {

    @Resource
    private CategoryServiceimpl categoryServiceimpl;



 /*   @PostMapping("/add")
    public BaseResult<List<Product>> add(@RequestBody Product product){
        int id = Integer.parseInt(JWTUtil.parseToken(httpServletRequest.getHeader("authorization"), "user").getId());
        boolean add = productServiceimpl.add(product);
        System.out.println(add);
        if (add){
            return BaseResult.ok("新增成功！");
        }
        return BaseResult.error("新增失败！");
    }
*/
}
